<template>
  <!-- 商品列表 -->
  <van-grid :column-num="2" :gutter="10" :center="false">
    <van-grid-item v-for="(item, index) in lists" :key="index">
      <van-image :src="item.pic" lazy-load />
      <p class="title">{{ item.title }}</p>
      <p class="price">￥{{ item.price }}</p>
      <van-button type="danger" size="small" @click="$emit('addCart',item)"
        >加入购物车</van-button
      >
    </van-grid-item>
  </van-grid>
  <!-- 商品列表 -->
</template>
<script>
export default {
    props:['lists'],

};
</script>
<style lang="scss" scoped>
    
</style>